<script>
$(document).ready(function() {
   $("a").click(function() {			    
	var url = $(this).attr("href");
	$.get(url,function(rs){
		$("#content").html(rs);
	});				
     return false;
   });
 });
 function setArticle(e,id,title){	
	var c = $(e).attr("checked");	
	if(c==true){
		 	
	 	$("#content2").append('<span id="right'+id+'">&nbsp;&nbsp;'+title+' <input type="button" onclick="delarticle('+id+');" value=" " title="删除" style="border:0 none;width:16px;height:16px;background:url('+"'<?php echo MVC_WWW_HOST.'img/warning.gif';?>'"+')"  > <br></span>');
	 	var v = $("#relationid").val();
	 	$("#relationid").val(v+';'+id+';');
	}else{
		 delarticle(id);
	}
 }
 function delarticle(id){
	
	 var v = $("#relationid").val();
	 var e = v.replace(';'+id+';','');
	 $("#relationid").val(e);
	 $("#right"+id).remove();
 }
 </script>
 
<table style="width:100%;line-height: 30px;">
<?php foreach ($rs['list'] as $k=>$v){?>
<tr><td  style="width:30px;"><input type="checkbox" onclick="setArticle(this,'<?php echo $v['id'];?>','<?php echo $v['title'];?>')"> </td><td>
			<?php echo $v['title'];?>;
</td></tr>
<?php }?>
<tr style="background:#eeeeee;">
<td align="center" colspan="2" style="background: url('');">
<?php echo $rs['html'];?></td></tr>

</table>